#封装PO页面对象
# 登录页面元素
Url="http://tpshop-test.itheima.net/"
from selenium.webdriver.common.by import By
# 登录链接
login_link=By.XPATH,"//a[text()='登录']"
# 用户名  密码 验证码
login_username=By.XPATH,'//input[@id="username"]'
login_password=By.XPATH,'//input[@id="password"]'
login_verify_code=By.XPATH,'//input[@id="verify_code"]'
# 登录按钮
login_button=By.XPATH,'//a[@name="sbtbutton"]'
# 错误信息 元素
login_error_info=By.XPATH,'//div[contains(@class,"layui-layer-content")]'
# 错误信息点击
login_error_button=By.XPATH,'//a[text()="确定"]'
# 安全退出
logout=By.XPATH,'//a[text()="安全退出"]'
'''
添加购物车
'''
# 回到首页
shop_home_page=By.XPATH,'//a[@class="home"]'
# 定位输入框
shop_cart_input=By.XPATH,'//input[@name="q"]'
# 点击搜索
shop_cart_click_search=By.XPATH,'//button[text()="搜索"]'
# 加入购物车
shop_cart_insert_goods=By.XPATH,'//a[contains(@onclick,"105).val")]'
# 加入购物车
shop_cart_two_insert_goods=By.XPATH,'//a[@id="join_cart"]'
# 返回添加成功字样
shop_cart_assert=By.XPATH,'//span[text()="添加成功"]'
# frame表单id
shop_cart_frame='layui-layer-iframe1'
shop_cart_frame_id=By.XPATH,'//iframe[@id="layui-layer-iframe1"]'
# 关闭窗口
shop_cart_close_win=By.XPATH,'//a[@class="layui-layer-ico layui-layer-close layui-layer-close1"]'
'''购物车结算'''
# 去购物车
order_click_cart=By.XPATH,'//div[@class="c-n fl"]'
# 全选框点击
order_check_all=By.XPATH,'//input[@class="checkCart checkCartAll"]'
# 去结算
order_go_account=By.XPATH,'//a[text()="去结算"]'
# 选择收货人
order_select_address=By.XPATH,'//input[@value="907"]'
# 去结算
order_submit_goods=By.XPATH,'//a[contains(@class,"gwc-qjs")]'
# 获取文本信息
order_text=By.XPATH,'//h3[text()="订单提交成功，请您尽快付款！"]'

